<template>
	<l-painter :board="poster" isCanvasToTempFilePath @success="finsh($event)" hidden />
</template>

<script setup>
	import {
		ref,defineEmits,defineProps
	} from "vue";
	let path = ref('')
	
	const props = defineProps({
		qrCode: String,
	});
	

	
	const emit = defineEmits(['getpic'])
    function finsh(e){
		path.value=e
		emit('getpic', e)
	}
	let poster = ref({
		css: {
			
			height: "660rpx",
			width: "500rpx",
            borderRadius: '16rpx',
			background: 'linear-gradient(,#82D3FE 0%, #D0F6E2 28%, #F7FADB 70%, #BEF691 100%)',
		
		},
		views: [
	
			{
				type: "view",
				css: {
					marginTop: "40rpx",
					width: '500rpx',
					display: "inline-block"
				},
				views: [{
						src: "https://fish.xinguanghudong.com/profile/2.png",
						type: "image",
						css: {
							marginLeft:'98rpx',
							width: '304rpx',
							height: '41rpx',
						}
					},
					{
						text: "发现更多钓鱼好去处",
						type: "text",
						css: {
							marginTop: "20rpx",
							textAlign: 'center',
							
							display: "block",
							color: "#000",
							fontSize: "30rpx",
							fontWeight: "500"
						}
					},
					{
						type: 'view',
						css: {
							marginTop: "50rpx",
							marginLeft: '70rpx',
							background: '#ffffff',
							width: '360rpx',
							height: '360rpx',
							borderRadius: '16rpx',
							display: 'inline-block',
						},
						views: [{
							src:props.qrCode,
							type: "image",
							css: {
								width: '360rpx',
								height: '360rpx',
							}
						}]
					},
					{
						text: "更多功能等你来解锁",
						type: "text",
						css: {
							marginTop: "30rpx",
							textAlign: 'center',
						
							display: "block",
							color: "#000",
							fontSize: "24rpx",
							fontWeight: "500"
						}
					}

				],
			},

		]
	})
</script>